#include "cond1.h"
#include <iostream>
using namespace std;

int testCond1(unsigned char *sbox) {
	int count;
	
	for(unsigned char d_input = 1; d_input < 16; ++d_input) {
		for(unsigned char d_output = 1; d_output < 16; ++d_output) {
			count = 0;

			for(unsigned char x = 0; x < 16; ++x) {
				if((sbox[x] ^ sbox[x ^ d_input]) == d_output)
					++count;
			}
			
			if(count > 4)
				return 1;
		}
	}
	
	return 0;
}
